const path = require("path");
const MiniCss = require('mini-css-extract-plugin');

module.exports = {
    mode : 'production',
    entry: {
      'page':'/src/javascript/pageJavascript.js',
      'signIn':'/src/javascript/signIn/signInController.js',
      'signUp':'/src/javascript/signUp/signUpController.js'
    },
    output: {
      path: path.resolve(__dirname, 'dist'),
      filename: '[name]Javascript.js',
    },
    module:{
      rules:[{
        test:/\.css/,
        use:[
          MiniCss.loader,
          {
          //'style-loader',
          loader:'css-loader',
          options: {
            url: false,
          },
      }]
      },{
        test: /\.(png|jsp|gif|jpg)/,
        use: [{
            loader: 'url-loader',
            options: {
                limit: 8192,
                name: 'image/[name].[ext]'
            }
        }]
    }]
    },
    optimization:{
      minimize: false,
    },
    plugins:[
      new MiniCss({
        filename: '../dist/css/[name]CSS.css',
        
      }),
      // new MiniCss({
      //   filename:'../dist/css/signInCSS.css',
      // }),
      // new MiniCss({
      //   filename:'../dist/css/signUpCSS.css',
      // })
    ],
  };